<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino AudioKit HAL: src/audio_type_def.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Arduino AudioKit HAL
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">audio_type_def.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Audio Types used by the HAL.  
<a href="#details">More...</a></p>

<p><a href="audio__type__def_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ac47f33c2a04533c5c0e7dfce6c92b8f8"><td class="memItemLeft" align="right" valign="top"><a id="ac47f33c2a04533c5c0e7dfce6c92b8f8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_8K</b>&#160;&#160;&#160;(8000)</td></tr>
<tr class="separator:ac47f33c2a04533c5c0e7dfce6c92b8f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26a3f9904f844d52c14e710e1056c94e"><td class="memItemLeft" align="right" valign="top"><a id="a26a3f9904f844d52c14e710e1056c94e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_11K</b>&#160;&#160;&#160;(11025)</td></tr>
<tr class="separator:a26a3f9904f844d52c14e710e1056c94e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a414f51652b4c82c50f3452b3252df318"><td class="memItemLeft" align="right" valign="top"><a id="a414f51652b4c82c50f3452b3252df318"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_16K</b>&#160;&#160;&#160;(16000)</td></tr>
<tr class="separator:a414f51652b4c82c50f3452b3252df318"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0948ce6410aad454a275066591464701"><td class="memItemLeft" align="right" valign="top"><a id="a0948ce6410aad454a275066591464701"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_22K</b>&#160;&#160;&#160;(22050)</td></tr>
<tr class="separator:a0948ce6410aad454a275066591464701"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a205c08fa94a4f578ac13069ffa77c3b7"><td class="memItemLeft" align="right" valign="top"><a id="a205c08fa94a4f578ac13069ffa77c3b7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_32K</b>&#160;&#160;&#160;(32000)</td></tr>
<tr class="separator:a205c08fa94a4f578ac13069ffa77c3b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad378eacc9bf202bc1a2a8d6baa5c8423"><td class="memItemLeft" align="right" valign="top"><a id="ad378eacc9bf202bc1a2a8d6baa5c8423"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_44K</b>&#160;&#160;&#160;(44100)</td></tr>
<tr class="separator:ad378eacc9bf202bc1a2a8d6baa5c8423"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac340dbbda36d8f1792cbd05fa54bfca5"><td class="memItemLeft" align="right" valign="top"><a id="ac340dbbda36d8f1792cbd05fa54bfca5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_SAMPLERATE_48K</b>&#160;&#160;&#160;(48000)</td></tr>
<tr class="separator:ac340dbbda36d8f1792cbd05fa54bfca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada08dfdc3212bb0113795986aaeefda6"><td class="memItemLeft" align="right" valign="top"><a id="ada08dfdc3212bb0113795986aaeefda6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_BIT_8</b>&#160;&#160;&#160;(8)</td></tr>
<tr class="separator:ada08dfdc3212bb0113795986aaeefda6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fab439ceb3860e3a7a27e77d489f466"><td class="memItemLeft" align="right" valign="top"><a id="a7fab439ceb3860e3a7a27e77d489f466"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_BIT_16</b>&#160;&#160;&#160;(16)</td></tr>
<tr class="separator:a7fab439ceb3860e3a7a27e77d489f466"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02cfef099aa33da9d83cbdd6b0cba8dd"><td class="memItemLeft" align="right" valign="top"><a id="a02cfef099aa33da9d83cbdd6b0cba8dd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_BIT_24</b>&#160;&#160;&#160;(24)</td></tr>
<tr class="separator:a02cfef099aa33da9d83cbdd6b0cba8dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27ca4786ddf42592adc92001a9bc9396"><td class="memItemLeft" align="right" valign="top"><a id="a27ca4786ddf42592adc92001a9bc9396"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_BIT_32</b>&#160;&#160;&#160;(32)</td></tr>
<tr class="separator:a27ca4786ddf42592adc92001a9bc9396"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7482818fcb31b082e8b314c505c67078"><td class="memItemLeft" align="right" valign="top"><a id="a7482818fcb31b082e8b314c505c67078"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_CHANNEL_MONO</b>&#160;&#160;&#160;(1)</td></tr>
<tr class="separator:a7482818fcb31b082e8b314c505c67078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a928930e4d4ce5006ad244ffabdf5c02e"><td class="memItemLeft" align="right" valign="top"><a id="a928930e4d4ce5006ad244ffabdf5c02e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_CHANNEL_DUAL</b>&#160;&#160;&#160;(2)</td></tr>
<tr class="separator:a928930e4d4ce5006ad244ffabdf5c02e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add1545431e7f2e18058abb81304c9beb"><td class="memItemLeft" align="right" valign="top"><a id="add1545431e7f2e18058abb81304c9beb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_U32_AT</b>(ptr)&#160;&#160;&#160;(((uint32_t)(ptr)[0] &lt;&lt; 24) | ((uint32_t)(ptr)[1] &lt;&lt; 16) | ((uint32_t)(ptr)[2] &lt;&lt; 8) | ((uint32_t)(ptr)[3]))</td></tr>
<tr class="separator:add1545431e7f2e18058abb81304c9beb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6147eddfc70ae8a4ad2adf1a124f1d7"><td class="memItemLeft" align="right" valign="top"><a id="ae6147eddfc70ae8a4ad2adf1a124f1d7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ESP_AUDIO_U64_AT</b>(ptr)&#160;&#160;&#160;(((uint64_t)(ptr)[0] &lt;&lt; 56) | ((uint64_t)(ptr)[1] &lt;&lt; 48) | ((uint64_t)(ptr)[2] &lt;&lt; 40) | ((uint64_t)(ptr)[3] &lt;&lt; 32) | ((uint64_t)(ptr)[4] &lt;&lt; 24) | ((uint64_t)(ptr)[5] &lt;&lt; 16) | ((uint64_t)(ptr)[6] &lt;&lt; 8) | ((uint64_t)(ptr)[7]))</td></tr>
<tr class="separator:ae6147eddfc70ae8a4ad2adf1a124f1d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a92c9c834f71bbb1e7afb02a85ec9b7f1"><td class="memItemLeft" align="right" valign="top"><a id="a92c9c834f71bbb1e7afb02a85ec9b7f1"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>esp_codec_type_t</b> { <br />
&#160;&#160;<b>ESP_CODEC_TYPE_UNKNOW</b> = 0
, <b>ESP_CODEC_TYPE_RAW</b> = 1
, <b>ESP_CODEC_TYPE_WAV</b> = 2
, <b>ESP_CODEC_TYPE_MP3</b> = 3
, <br />
&#160;&#160;<b>ESP_CODEC_TYPE_AAC</b> = 4
, <b>ESP_CODEC_TYPE_OPUS</b> = 5
, <b>ESP_CODEC_TYPE_M4A</b> = 6
, <b>ESP_CODEC_TYPE_MP4</b> = 7
, <br />
&#160;&#160;<b>ESP_CODEC_TYPE_FLAC</b> = 8
, <b>ESP_CODEC_TYPE_OGG</b> = 9
, <b>ESP_CODEC_TYPE_TSAAC</b> = 10
, <b>ESP_CODEC_TYPE_AMRNB</b> = 11
, <br />
&#160;&#160;<b>ESP_CODEC_TYPE_AMRWB</b> = 12
, <b>ESP_CODEC_TYPE_PCM</b> = 13
, <b>ESP_AUDIO_TYPE_M3U8</b> = 14
, <b>ESP_AUDIO_TYPE_PLS</b> = 15
, <br />
&#160;&#160;<b>ESP_CODEC_TYPE_UNSUPPORT</b> = 16
<br />
 }</td></tr>
<tr class="separator:a92c9c834f71bbb1e7afb02a85ec9b7f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcfb55071ca074a03a968865a57b1b87"><td class="memItemLeft" align="right" valign="top"><a id="abcfb55071ca074a03a968865a57b1b87"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>esp_decoder_work_mode_t</b> { <b>ESP_DECODER_WORK_MODE_MANUAL</b> = 0
, <b>ESP_DECODER_WORK_MODE_AUTO</b> = 1
 }</td></tr>
<tr class="separator:abcfb55071ca074a03a968865a57b1b87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9a0b688fa6d43d212c01c326aad0d55"><td class="memItemLeft" align="right" valign="top"><a id="aa9a0b688fa6d43d212c01c326aad0d55"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="audio__type__def_8h.html#aa9a0b688fa6d43d212c01c326aad0d55">esp_codec_err_t</a> { <br />
&#160;&#160;<b>ESP_CODEC_ERR_CONTINUE</b> = 1
, <b>ESP_CODEC_ERR_OK</b> = 0
, <b>ESP_CODEC_ERR_FAIL</b> = -1
, <b>ESP_CODEC_ERR_DONE</b> = -2
, <br />
&#160;&#160;<b>ESP_CODEC_ERR_ABORT</b> = -3
, <b>ESP_CODEC_ERR_TIMEOUT</b> = -4
, <b>ESP_CODEC_ERR_UNSYNC</b> = -5
, <b>ESP_CODEC_ERR_UNSUPPORT</b> = -6
, <br />
&#160;&#160;<b>ESP_CODEC_ERR_PARSE</b> = -7
, <b>ESP_CODEC_ERR_INFO</b> = -8
, <b>ESP_CODEC_ERR_INPUT</b> = -9
, <b>ESP_CODEC_ERR_NO_MEM</b> = -10
<br />
 }</td></tr>
<tr class="memdesc:aa9a0b688fa6d43d212c01c326aad0d55"><td class="mdescLeft">&#160;</td><td class="mdescRight">the enum value from <code>ESP_CODEC_ERR_OK</code> to <code>ESP_CODEC_ERR_TIMEOUT</code> rely on <code>audio_element_err_t</code> which in <code>audio_element.h</code>. <br /></td></tr>
<tr class="separator:aa9a0b688fa6d43d212c01c326aad0d55"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a792e6054b2fd059731f371d7d5a804ff"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="audio__type__def_8h.html#a792e6054b2fd059731f371d7d5a804ff">get_codec_ext</a> (esp_codec_type_t codec_type)</td></tr>
<tr class="memdesc:a792e6054b2fd059731f371d7d5a804ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gain codec extension. need to sync by <code>esp_codec_type_t</code>. eg. esp_codec_type_t codec_type = ESP_CODEC_TYPE_MP3; char* ext = get_codec_ext(codec_type); the value of ext is <code>mp3</code>.  <a href="audio__type__def_8h.html#a792e6054b2fd059731f371d7d5a804ff">More...</a><br /></td></tr>
<tr class="separator:a792e6054b2fd059731f371d7d5a804ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Audio Types used by the HAL. </p>
<dl class="section author"><dt>Author</dt><dd>Phil Schatzmann </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2021-12-12</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2021 </dd></dl>

<p class="definition">Definition in file <a class="el" href="audio__type__def_8h_source.html">audio_type_def.h</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a792e6054b2fd059731f371d7d5a804ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a792e6054b2fd059731f371d7d5a804ff">&#9670;&nbsp;</a></span>get_codec_ext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* get_codec_ext </td>
          <td>(</td>
          <td class="paramtype">esp_codec_type_t&#160;</td>
          <td class="paramname"><em>codec_type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gain codec extension. need to sync by <code>esp_codec_type_t</code>. eg. esp_codec_type_t codec_type = ESP_CODEC_TYPE_MP3; char* ext = get_codec_ext(codec_type); the value of ext is <code>mp3</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">codec_type</td><td>the value of <code>esp_codec_type_t</code></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>codec extension </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
